#ifndef __LIGHT__
#define __LIGHT__

#include "Point3D.h"
#include "ShadeRec.h"
#include "Ray.h"

namespace Engine
{

	enum LIGHT_TYPE
	{
		POINT_LIGHT,
		DIRECTIONAL_LIGHT,
		AREA_LIGHT
	};

	class Light
	{
	public:
		virtual Point3D GetDirection(ShadeRec& sr) = 0;
		virtual RGBColor L(ShadeRec& sr) = 0;

		float GetRadiance()
		{
			return m_ls;
		}

		void SetRadiance(float p_ls)
		{
			m_ls = p_ls;
		}

		void SetLocation(float p_x, float p_y, float p_z)
		{
			m_location = Point3D(p_x, p_y, p_z);
		}

		void SetLocation(Point3D& p_location)
		{
			m_location = p_location;
		}

		Point3D GetLocation()
		{
			return m_location;
		}
		virtual void TestIntersection(Ray&, ShadeRec&) = 0;

	protected:
		float m_ls;
		Point3D m_location;
		GeometricObjects* m_objectRepresentation;

	};
}
#endif // !__LIGHT__
